// 导出一个promise请求函数

export const request = (params) => {
    return new Promise((resolve, reject) => {
        // const baseUrl = "https://yunbao.greatforest.com.cn/ruoyi-admin"
        // const baseUrl = "http://192.168.3.144:8080"
        wx.request({
            ...params,
            // url:baseUrl + params.url,
            success: (result) => {
                resolve(result);
            },
            fail: (err) => {
                reject(err);
            }
        })
    })
}